package main

import (
	"fmt"
	time2 "time"
)

/*
给定一组 互不相同 的单词， 找出所有不同 的索引对(i, j)，使得列表中的两个单词， words[i] + words[j] ，可拼接成回文串。
示例 1：

输入：["abcd","dcba","lls","s","sssll"]
输出：[[0,1],[1,0],[3,2],[2,4]]
解释：可拼接成的回文串为 ["dcbaabcd","abcddcba","slls","llssssll"]
*/


func main() {
	time:=time2.Now()
	var list =[]string{"bccccabcacca","caaaaacbaacaaa","ccccab","cbacaabaaaa","cbcacbcbccbbbbc","abacbaaaaccabab","bcba","abbbb","cbccbbaabac","cbbcbbcbcbccccb","acbbbbccbc","cacbbabbc","bbacacbbc","abcaa","acbbab","b","babccbbaacbbaaaacac","bcaaabbcabccbcbcbc","acbbcbb","ccbcbaccbcac","bacbccacbcababba","a","baababbcabcc","abccabac","ccbbb","caccaccaaccbc","ccaccbbacbcaaca","abc","aac","baccccbbbcaa","cba","cbaaaabba","acccbabbabbcacc","cbcacccbbcaca","bbcabaaaaacbcbbb","cc","bbaaccc","bbcacbacaacaaaca","cbabbcababcacabcbcc","ccacccabccbaacbab","babcccacaaca","baacbaccaccbbcbb","cacaaaa","abcccaca","bbabccccbccacaabc","acbcaaababba","cccaacaca","aaabbcbccbaaaacbbbac","cacab","aba","ccacbcaaccccbcccccb","baabaaaaaabccab","aaabbbbbbba","caaaaabcabcbbba","aaaabbab","babbaaca","caac","acabccb","cbbbbab","cbbacc","ccbcabbbaccbaabb","bc","abbc","cabbbbccaa","cbbcbbcbcabbbc","bcbc","ccaaa","acacacbccb","aabccccbcabbbcbbbaac","babcbbacaaaaa","abbcaabbbaaab","bbababbacbbcbaacbbbb","bcabbbbbabbaaaab","bcbabcbccbbb","acbacbcbc","ccbcbbcbba","bcabccabb","accbbba","acccbcccbcba","cbcb","cabbbaaababc","bbbbbbaaacccabcb","cbbbaccabacbcbcbc","bacc","acbcabccbccaabccb","aabbbbabbacaccc","acbbccbccababcbaac","ccbcaa","caaabbccaabca","abbaabcccca","cbaaaa","bacbbacccbaa","cca","aabcaacbabcacaacb","cccbbccacbabac","bbcca","caa","babcbaabbbaca","bbabaacccabaacabcc","bcbaacababbbcccb","accbabaacabbcaab","ccababbccba","caccabbccabccacc","cbb","bccabaabcb","baabaa","bacbaaccbacbca","cccbcbbccababb","bba","bcccbcbbccaca","cccabcbcbccba","bcccaaccb","babaacacabbacaaac","bbcaacbcababaacba","bbacacbabbbaac","cbcbccbaccbbcaabbbca","babccaaccaacb","cccbacabcaaccbbba","ac","aaacabcbabbbbbccbbba","cacbb","abaacaaab","cabca","bccababcbc","cababaacbaaacbaaccca","ccccaccabaa","bbbb","bcbbcccabcaaca","bccacabbccaaaaaabacc","caaacaabbcbaababcc","bccb","bacbaccaaaaacabc","acccc","aaccaccccaacc","babbbcbccbc","ccaabca","acccaaccbbca","bbaabcbaabbabb","ccc","bbcacacaacbbbbbcba","bccacabb","baaacabaabcabcc","bccbcbccc","bbaccbca","aaabbccbaabcbac","caba","aacbbccaaaaccccab","cababbcacabcc","bbbbabccaccacacaac","baaabcccabbcbaabcba","cabaabbccbabbbaabbcc","cccccabaacbacab","aaaaabbbabcbbbaabbc","cbbaaccbc","bacbccba","bcacccbcbabaaaba","cacaccaaabaccccb","bbbcbacbaababb","cac","acaabb","bbaabccccabcaacabc","aaccbaabcbacbca","cccaaaaacaccabacabbb","baabaacccaacabacbb","bbcaccab","ccababccb","cabbbccabaac","acbaacacbcccccb","abbaab","aabbbaabcb","cccbcaaaaca","abbabacacbcbbaabacc","bacbcaa","cbcccabcbc","bcabcaccaaa","ba","bbccaccba","bccacaccacc","bcacbacaacbabccaaaa","bbcacc","bccaaacacaaaaa","cabacabbb","aacbcabccaaabaaba","acbb","c","bbccbcc","cbaabcb","cbbacbbbbcccb","accbaccbcbcacbbc","aaabccabcacbba","bccbcbbcbaccccbbaac","aaabacaacab","ccaccaabcbaabacb","cabaccabc","ccaabccbacc","ababcbababc","cccaaacccaa","ccaccacbbcabbab","baba","baccacca","abcbcaababbbabbab","bbc","ccbaacbacbabccbacca","bbcaabcacbcaabccc","aa","cabcb","caaaaaccbabcbbbab","cbbcababbcbbaaaba","abbbbcabbccac","cbab","bbbcccbacbcbba","bcacbbccbbbbcbbcca","bcbbcbababbc","aacacbacbab","accbcab","bcaabbc","abbccbbbacaaaacabaaa","cb","abbcbbbaaacacbba","acaccabccbcc","abbabbab","bbabaabacbaacbacbabb","baaa","bab","aaccbcacabcbca","aacaacaaabbaacccbcb","bac","cbbacbbbabab","bbbacaaaca","babcacb","bccabbaaacaccbbaabbb","bcbbccbbaaab","acc","acbcaabacbcbbb","abcb","cbcbaba","accbbcaabac","bccabbacbbcabbcab","aacaacccbabbcbbcacbb","aacaacbbabccacbbc","bbcbbaaaabaaabbbbcba","ccbcacaca","bbcbbcabbcba","cbacbabbcbbbabcc","bbac","bacaabc","cacccaabacaacbbbbab","bcbcbccaccbbcabbc","abbcbababbcacba","aababbbccaaa","bbabbbbb","abb","ccccbcbcbabbbaacac","bccbabb","accabbcbbbcca","bbcabbacbbccaabccac","acccbabacabcc","aacabaa","aababbbaaabaaabaaba","bacbbbab","bbcabcaca","ccabcaaab","bcbcc","abcabaabaacb","cbbaacbbbcabcc","baaabcabc","bacbacabbbbcaba","acac","cbbbacb","cccabacbbaaaab","bcc","baa","cbacacbcccc","cbbcaaabcacabbcca","abaabcbca","bccababbaacb","accbccbbba","bacaccacbcb","abaacca","bcbaabbcbcbab","abbaaaacaabccabbb","acbababaccbcbccb","bcabcc","ca","cbcbcbaacabbabcbca","caacaacbba","cabababcbba","bacabbaacbacb","baccbaabacaaaa","bbacbacbb","abaaabaabcc","aacabcaba","bbacccb","abbacccbb","acccbacaccaaaccabca","acacb","ccabbbcc","aabaaccabcabccccc","bccac","ab","abcbabcb","caaaaaaabbbbccacbc","baabbac","bcbbcca","bccbbbbcacbbbaccba","accacaabbbaacb","acaaaabacbacaccbbca","abbabacbaccacca","bbabcbaaabbbcacbacbc","bbbc","acbbccaaa","cabba","acaacccbccbccabab","abbcabac","bbaacca","cbbccccccbcbbbacbc","aacbbccab","bcbbb","cbccaaabacaac","bbccc","ccbba","bbabcbcaabacbaaaccb","bccabb","acacbbcc","cabcacbabb","accbbcbaabccbb","bccabacabaccac","cabbbacbccabca","bcbab","cbcabac","bbabbccaaabb","aacabccacbaaaccbcaab","aaabbaab","bbacbcabcbbc","baacbcaccaabbcbb","abbcbcbcaaccaccab","bbccabcbab","bb","cbcaaaccccbabbba","baaacb","aaac","aaccba","cabacccbbcaccbc","accbccccccacaacb","bacbaab","aaaabcbcabacaa","bcb","cbcbccbb","acacc","bbbaccbccbbbbcaa","caaacabccbbaacbcabab","ccabbbaaaaabcbccbba","cbaaacbcb","aaacbbabaa","aabacbcbbbcabaa","caacacbaa","baccacc","baccaaccaa","accaaaacaabcabbac","accabacaa","abccaa","baaabaaab","bccabbaaab","cababbbbcccb","aaaab","bbbbcabab","abaaabcc","ccbbbaabbcc","accbaabbbacaaccaaac","baaacabccacacbbac","abbbacccbabccabbb","bacbb","bcbacbaccbcabcbcaaba","bcbaaacccacacb","bbaaaccacbbbacc","bbaabcaccbaccbbcac","cbc","cccbbababbacc","cbababbcbaacabbbc","cbccbbbcbaa","bbbaa","baabcbccbbaaaca","bccbbccbabbbacaaac","babcabb","cbcabcccaaaba","ccccaacccbcaaccbcb","babbc","abbbcbbaacab","cabb","ababc","cbaacbcaaacabbcbcbcc","babaa","abacbacbbbcccbbbcc","abcaababaabbcbbabb","cbbccbbbcbccaabbc","bcacaaac","bcabaac","baacaccbccacbbbbccb","bcabccaccbbcbbbccbba","aacbacbac","aaaaacbaabcbccbaabcb","abbaccabc","ccaabbb","ccbacabacb","bcacacbbbbcbbbbccabb","abaaaaccaac","cabbb","ccbbaacacaccbccb","ccb","abbcca","bcaccbbacbcaaccbb","bacccbccaacccabcb","aaaababbccaca","acbcaaacaaacab","cbcccbcb","aabababbab","accbbcccbccbabcb","ccccacac","cbbbabbabbcabcbcc","aab","cbaaacccabbcbbbabab","bccccbccc","bcacbbacaabcba","cbca","ababacaaa","accbcbacbaccccba","abcacb","acacaca","cabacc","bccbccabbccb","cbccbcaabaaacbc","ccabacbcccc","cbcababacabbbbbacab","bbbcaccaaba","cbbc","ccbbabaabacacbcc","caccacaaccaabaa","cacbcaabbcaccacbccbc","ababbcabaccbcaccc","bcbaccabbabaac","cbbaabca","caaccbaabbc","ccbababcbbbac","cbaabcbcbcacbb","bccbacbaacccbcbbbba","bbcbabb","aabccabbbcb","aabbcacacbaaaaacbba","bbcccbaca","ccabcab","babccaccbaabac","cacacaacbcccaacabba","cabacbaacbbccaa","bababbacbbbcaacacca","bbccbcac","bbabcacacaccccccbbac","abcacaababbaca","bccbcbbb","aaaacacbabacaabb","aaaaacccccaaaaabacc","ccaabaabacaba","aaabcacaabcabc","bbacacabcab","ccbaabbccbb","bcbcbaccccaacba","cbbccaacb","cabaacbbbaabbba","cbcabcacbabaaabbab","ccacbac","abaccbabb","bcabcbcbabacacaa","bcabb","bbba","aabccabbaabbbb","cbbcabaacbc","bbbbbccacaaaab","acb","bccbcaabcacacaaba","cabacccbbcbaaabacbb","cabccaccaaacaabc","acabccbc","abbccaaccabbcbb","bcbabababccaa","bcaa","baccaabbb","cccacb","ababaaacbbbbacbb","ababacbaabbbaabcbabc","bbacbbbbbccbccaaaabb","ababbbbbabacabcac","bbaccbccaaaca","ccca","acaccabbcaaac","cbabaaccbc","ccaba","bbacabba","ccbbaacab","abcba","bccaaccbaaba","acbaabacbcbc","ccabbabbc","baacbcccb","baaccacc","caababaccbc","acabacbcbbaacccccc","cbabaabcccbabaacb","abab","acacbc","bbbbcbbaabaa","cbbaacab","bbabb","bca","abcaabccbacbbbbaba","bacbccbcacbcacca","cabbcaabbbcbcb","cbacbacbbbbacb","cbacbcbcbaaaccabbcca","bbcccccaacbbccccba","bcbbcccbaabcccccba","acbabaabbacccbbbcc","aca","bbaabcaabaab","baabbcbacccaa","cbcacbccaaabbccbbbb","abbabbbcaccacb","babba","bbaabbcc","cabccbababc","cbcbcaab","bbcbaca","aaabcaccba","cccb","aaccabcbabacba","accbbbbaccccccabccca","baaabbaaaabb","bbababba","cbbcccb","cccbccaccabbcbca","bcacabcbcaaaaaacaa","bbabbacbca","ccccabccbccb","bbccbcccab","cbabbccaaaa","baacabcabcccbbab","baaacaabbcaababaa","abbaabcbbc","aabcaaab","abcbabccacacacba","abbbaba","caabbc","cbbbbcaacbaabca","cbbccccbbcacacaaccca","bccbabbacb","bbcaabcbbbcccbbcc","cbbabbbcabbbc","caabacbbbcc","abbcbacabacbabaccbca","bccccacca","cacbbbbcabbbcbacbba","acbc","babababccb","cacbacaaabcc","baacacbcaabbbcabab","cacbacbbcabcacccabaa","bccabaacac","aabbbccccbbbacaaaabb","cccabcbcbcc","aaa","babcbccbaacacb","bcaabcaccba","aabbcabcab","cbbccbbbcccbc","bcbcacbaabb","ccbbaabacbb","acbacbabccacbacaca","caaccb","bbbbbabbbabaabbacc","cabbbbcacbbabcbb","accbcabab","bccbacccbbba","acccccc","bcacaababbcaca","baabbbabcb","acbcbbbabcca","bacabbccabacabb","abcacaaba","bacabcb","baaaccbbabcaccbaaaa","ccabacaaccaaccb","bacbbc","caacaba","aabaa","cbcccbccaaacacaa","bbccabbcaaabca","baccabbcabaaaccccaab","cacbaccbbccccbacacb","ccaabaaaabbbab","aaabcc","babbbbbbcac","abaaabbccbacc","aabcaccac","bccacabacccb","aababcccbbcaaaaac","cabacaaacaa","aaccacbabcbaaa","cabbabbabbcc","cabbbabbbbc","bbaabbccabab","abcbbccc","bacaccbacabccaaaba","abababbabaccababac","cbabcccbaabcbccab","bbacbcbccccc","bccabbbcacaccaabb","ccbabbaa","acbbacbbbb","ccac","acbcbbbaacbbbbbaaab","cbbaaaacbaa","cbbaabaaabcab","baacaaaccbb","babbbcababbbaabcb","accacabbcaca","cbaaacacbaaabcccab","accccccc","bcbbaca","cbbcaacbbcbcbbcacccb","baaabbbbbaccca","babbacaabcacbcbbc","bcaaccabbcc","bbbacb","acbcccaababbacbca","bbcb","bcbacccba","aacccacaabaaaacb","accbccabbcbbbcbbc","acccbcbbbbbaacac","accb","cccacbaabbbb","cbbcbcbcabba","cbaabbcbacccbcacaab","cbbca","cbbbbbaccbbbaaacbaac","bcac","cbcacaccca","abaaaacabcbbb","cacabbccbbc","ccbbacaab","bbccaaaa","caaacbbbbaaabaaaabca","ccbbaabcbaa","cacacab","ccbcbbc","cbcccabccbcabbb","cccccabacaa","accaccbcacb","acababcaacccbaccbaca","caababbaccccabcabb","cabacaaaaaaacabcaa","bcabbbacaaabbb","bbbbcbbcabb","bbabaabacaaabac","cbbbbacaaaabcabca","bacabaccabbacacbccba","bccbcbbc","bbaab","cbaacc","bcacaaaa","babbccacacb","abbaaccbcccb","ccaca","baacacccccc","aacacbaaa","bccccbabcbabb","acacabcbaacacbbbca","acccaabcbaabcbbacbc","caabaabababa","cbababaccabbcaacaaa","cbaacaacbbba","abbb","bcaccaacccccbbc","abcaac","abcbbacbaaccacbcc","cbccacabcacac","ccabcbbaacbccbccb","ccabaa","cccbbcaaabccc","cbbcc","abaaccbbabaabcbccab","bbbaaccb","aaaaca","aabbccccacbccccbabb","bbb","cbbbcaaabcaccabab","abcbbbbacabbac","ccacc","cabcbaccccccc","cbba","cabbababacbcaaccaccc","ccacaacbcb","ccaabbcaabbcbbc","bcccacca","acbbaacbaabbbbbbbbbc","acbbacabbbcbcaccccc","ccbbaabaabbbbcabc","babccaabbccbbcc","aacccccbccab","ababccaaaa","cacaaacbb","cbbaacacbbb","babccccabbcaa","cbbaccbb","cbcccbbcbcaaacaccc","ccbac","bbcbcacbbaaababa","bbcabcccaabc","bbacbaaacb","aacbcaacb","aaacbcbcbbbbbaaaaaca","abbcaccccaabcbacbbca","aaabcbaaccbab","bcacccaaacbcbabbbac","acaabaabcabacabbccba","bbacbaccc","bcbcca","ccbacacacaababac","ccabbbbccbbcbab","caabccc","aabaabacccbcbcbb","caccccaabcbaabaabacb","bbcbabacaa","bccccaacabcaccacaacc","aabbccc","aacaccbcbabcabaababc","bbccba","acbcbbabbcb","aabacacaacbbcc","aaaacbccabab","bcababbbcaabcbacac","baabacaccabcabaa","abacacbcccbaabbabba","bccbbabacaaacacca","abbccaababab","abccabcbbaba","baabcaccbaccbba","abccbbcabbbcabcabbaa","bcaaaabac","aacbabaaabcb","acbcbbaaccaab","cbaabbccaaaaccaababa","ccbcacaccccccbcaaa","acbbaacacacbacca","cccbb","aaaaaabacaab","ccaccababacbb","aabbabbbbcbaaaaacaac","cbcbcbbcbcacabaaabbb","abababb","abacbacbc","abccccabbb","abcccbcbbacbbccbabbc","abababbabcabba","acccbaabb","cbaabacacacb","aabcacbbcacaabccb","ccbcacbcaccbbac","bacacbbcbcbabc","aaaabacaabab","abcbababcbaca","cbaacabaaccabccab","cabbbbccaacbb","babbbabcacbbabcaabbc","aabcaccab","bbbcacab","bccaccccc","bcabaacbaaaccbb","bcbcbaaacaaaaabac","bccbabccaacaccc","abbccabacc","baab","bcaccaccaaa","abaccac","abcaaccabccaba","cabaaaabbaaac","bcbcbcacabccccac","caabacabbccac","ccccacbabab","cbacbcbcaababbc","cacabbbabaa","acbbbbabbcabaacbc","aacbbca","bcbccbaaccbcababccaa","acacccbabcbabcca","cbcacabac","cbac","acccacabcbaabbcbbccb","bccbcccaacabcabb","cbcabbbcaca","bbcacaabcbcbbbccccc","bbacababbbcbccb","ccbabacabcbaba","acbbacababbacbcab","cbaaabaccbccbcabb","aababbacabbbacaccbc","cacbbbbabacabb","babcbcbbabccbcbb","abaa","caccbbcaccaacbbaaaac","cabbbbaabcacabcaba","abbcbbbacaaaacac","bacabaacca","bbaaaccbba","cbbbcbabccabacab","abbbccaccbc","baaaacaaccbca","cacbcab","bcbbc","bbbcbacaaacab","abbabbbcbbcbbcaacbb","bbbaaaaca","cbaacacbbaaacacbb","cababcaabcccbbbca","cbbcaabacabcababcaaa","ccaac","cbaabcabccabc","abbcbcbcacacbabb","accaabbaababbaccab","abccaabbbaabbbbccaa","baaacbcbb","acacbcaccabcccaa","abcbcaaacbbbc","bbbabbbccaacbbaaaa","aaacacbabc","cabcaacccbc","cbcbccabcbaaaca","aaccccacbcc","babcabcbaaca","baaccaabb","cbcbaaacc","cccbbbaccaccbac","bacac","acabbcabaaabbbcaa","acbbbbcb","cbacabbacca","ccbcbcbaa","cacacacabcab","caccbbcbbcbbaaccaa","cbbbbbbcaac","cbbbbbbccccabcb","aabacbcbbbab","acbaaacabac","bcaaacbbbabbbacbcab","acbbcbabc","bbcaccabbbcacbaaa","bcacbaaaccbca","aacbcccaacc","babbaa","ccbabababcab","cacabbbc","abcbacbbbbbbbc","bccccccccaab","ccbbac","aaaacca","accaabcaccaa","bcaacbaca","bbcabbacccac","cbccbbbbbaab","cccabaccacacccccbcab","bccaaabbccabacc","bbcbccbbcacbcba","abcacccbabacccbbabc","ababcabbcaacbcab","accbac","bccccbcbacabcbca","cccac","bccbbcb","bbaa","accbcacaaccb","acbbccabbcbac","abccc","bccabaabaaaa","acaabcbaccc","baccbbabacbcccb","aaabbcbabbacbcabaa","caaaacbbca","ccabaaaccacba","abbcaaacaccba","bbabcbbcacc","ccbbbc","caaaababacb","ccbbcbaaaacaaccbcb","caacbb","ccaaaaabaa","bbabcaccbaa","bbbbaac","aaabbacca","bcacbababcac","caccbaacc","bccacbbbc","caacbabcaabcbcaccbab","bcccbbaacaacbcc","bbccabbbbbbbcac","bccaabbacca","cccabcabaccbcabb","ccaaaabacbbcc","cbaaaccb","bbaabcabcaaaacb","aacacb","ccabacaccac","aabaacbbbbbabbbcacca","aabcbcbbacbbabcab","acabcabbacacccb","cbabcacabacc","abccabaabaccaaccbbc","ababaaa","aaaabcbcbc","bacbcacbabbb","aaaaabc","bacabcbcccaccbcaaca","aabbccaabaaca","aaaaacaacbccabcc","ababbcbaaacbbba","cccbcbaba","bbbcbbcbcabbacbaa","cababaabbabbaaacbbca","aacbcbcbababbcabbcba","cbaccabbbccaaccac","cbcbcccc","cabbccccac","bcca","babbaccabbacaccbcc","aaccbcbbc","ccacbbacccc","cabccbbaccb","abbaacbb","aabca","bcccaacccac","acbcb","bccaabacabbabcba","bcbabbbaaaccbcacbbb","caabaacaaba","cacabcccbccabaaccba","bbbccccbbacbacbbab","caaabbbbcabbbbc","aaabcacacacbbbcabbc","cbcacabcab","acca","acabbabaacbbabbbbcb","cacbaacbbaabcbbac","bccacccbca","aaaaccabb","bcbcccbbacaacbbbb","abacaccbcaabacb","accbbccccacaaba","cbbbbbcbbaba","aacabcbac","accbacabacaacaac","ccbcbabbcbaabbabac","cbbbbc","aaaccbccabcccbbccc","caacac","cacacaaa","bcccbabaaccababbccbb","caacacbbcccccccab","bbaabcccbcbaabacccab","cbbaacbbab","baabbabcbbbccbbb","cccbaaaccaa","aaabababbbabbaabaccc","aaccaacbabcabbc","aaabbccccbacac","bbbacbbbaccbaccca","bcabaccacbbaccbccaaa","aaabcbacbcbcbbaaabc","bbaabcbabacbacb","accbcc","bcacacbabbacabbcac","abcccbba","aaaaaaacabb","cbabcbabbaaca","aaccbaacbcaacac","abaac","bbbbcb","caccbaccababbb","bcabcbaacccaabbacab","baabbaacaaaacaaabab","ccaacbbacaa","cacbccaccaa","accbbcccbaacbabcccc","caccaaabbccacbccccc","bbabcacbbcbaab","acbccbabbabacaba","abcaaccbacccabccbca","bcbcabaccaabcbbabb","baccccbccacaaab","cbbcbcccc","aaaaccaccabc","caca","accabcbbb","accabcccbbbabccc","aaacaababcc","bbabccacc","abcbbbbbbc","cbbabbb","aabcacbabaccca","ccbaccabbcbcccac","baaabbbacaabcccbcba","acaaccbcabccbb","acbccbbccaac","abaaaaccbbcca","ccbbba","acbacbcbb","ccccaca","baabcacc","cbbaa","cacaabbab","aacacbabcbc","bbcbbbbacbbbaaba","cacccbac","abbbac","abacbaaaaaccabcaba","cbccbbbb","bbbac","caaabccbbcaaa","cacabaabacbabcbcc","bcbbabbcaaba","abaaccbbbacbaacca","cbcabbbc","cabbcbaab","baabbaabaccacbbcc","aabbcbaba","cbaaa","bbabacab","ccaacacbcbccbbbac","aaccaaaacaababbcac","aabababbaca","cbcabaaacacc","caabc","cacac","bbbbabaacaaccaccb","abacccabbccb","ccaaacab","bbbabaacabababcbbca","bbbbabbacacc","abbcbacb","babab","babcbbbabbacbc","abbacbcb","bbcaabaaaabb","cccaccabcbaab","cbccbab","bbaacccbaa","bbbabccccbcccbcb","bbbbc","bbccbacbbacbcbbbcba","cbabaabcabcaabccbbab","aacccacbcab","aaab","bbcab","cacbcbcccbbcca","baccbaccbcccacb","bcbaa","aaacbcaaa","baaccaab","cbaacbcbccbcacbcbbaa","ccabbcc","bbbabbcaac","acaaaaac","bbcaacbbbaaccbbbcccb","aacb","ccabbaaabcabccac","cbcaabbbacacb","abaabcbcccaaccbc","acabaacacabbacabbaac","cbbcacbacaaca","aabccbbccbabaa","cbaaccbacba","bacbbcaacbacac","abbbcbbacabcabaabca","acaccbbc","abbabacb","abccaaaccbbcbcbcabcb","bccbccbaacbbc","ccbccbaabba","bbaaccab","bcbabcbbcaacabc","aaacbaccaabb","cababcbcbbbaaaccab","acabb","acbaba","baccccaacaab","cccccccccbbccaabaaaa","abaacaacabcbabb","cacccaaccbbbbccbaac","bbacbccccaacac","aaaabc","aacabacbbb","babacabcaaaac","acbbccbabcbaca","cacca","cababaccbc","aacbcbaabbcccbccccab","aaabccbabaab","bacaacbbcab","cababbabcbcbbabccc","ccacaacb","cccbaabacbbbaca","abaabbacaacacabccbc","cbbbc","cabccacbcabcb","cabccbbccacababcbacb","cbbb","baaacacaab","bbbabcccacca","acbabccbcacccb","bcbbcccbcacbcbc","bbbacaca","bcbbbbcccaca","abaabbabc","bcbbbccacbabaccaa","cccccbabb","bacaaccccacbccccb","baccbbacc","cbaaabca","caacaacbaabacbaccc","aacccbaaccabbcacca","abcacbcacacca","babac","cbaabaaaaaab","baabbcaa","cccbabcabcbbababca","bcbcccc","ccbbaccac","caaabaababbaabbbcaa","acabaabaaccbc","cbabbabaaccabbccb","ababbccbcbb","ccccabcbbcaabbaccb","cccacacbcbbbcaab","cbbcbbbcbcb","caabcccaab","aaccccbcacba","accbb","cabcbaac","aaabcccbbacaabab","acaaac","abaacbccaac","caabaccbbcbcbcbaba","cbcacbccccabaccccca","acbbbcacccbbacabbc","baccccbacccbbaac","bbaaa","aacacbbc","bcacccabc","abababbbc","babaabbbba","bcbacbaccc","baccbaabcaccba","acbabacabb","abbcabababcac","acccba","bbbccbaaa","cacbbbcbacabbc","abbccabcca","aababcbcaaabaaab","abcaabaa","baccbacacaca","cbbabb","bccbbabcbbbbbcbaca","ccbabbabaacab","cbbcabacbccbcbab","babaab","cbbcba","ccabbcccbacc","bbabcb","bcbccccbaaacaccaaa","bbbbbbbabaa","accbbcccaaaabcaabb","babbabccbaacbbbcc","cbcccbaabcbcbaacbab","cccabacccbbbb","cbbbacabac","bccacbacccacbbaaaa","abcacaa","abaaabaaaacaaaaca","bacbbaacbccccca","abaacbaaaacbccb","cccccaaaacbcbbbc","cbbacacbbabcaa","cacaaacacaccc","bbbbcccbbcbbbbbbabab","ccabbbaabbaabcacbbac","cbbcaaaccb","ccbbcbaabacbaaabbcab","bbcabcc","bbbabccabcbbb","caaacbaacabac","acbcbaabccbacacabcc","bccaaabbbbcbac","acbbbaca","cbccb","cbcbaaccbbcbaaaaaa","bbaacaaaabaaacbcb","cacaccaaacaacaccb","cbcc","bbbcccbcaccccbca","abbabcabbbbbaaa","abbcacabbabbbcaccacb","bacbcbbcabacabbac","bccabbbbbbcccbaacab","babc","bbbccaaacbcacaba","abbabbaabaaaccab","bacbca","bccacbca","aabcb","aaccbbaabb","aabbcbbaaccba","accccaaaacaabbc","acacbaabcabccbcbca","acbaccccbbaaaaa","abbbcabaab","bbbbcbaccac","ccacbbacb","acbbbacccbbcccabbac","cabcbaccbaaabccccabb","baccca","cbaaccaabacacaccbba","aabcc","cccbacccaba","acabacbbabcbabcccb","bccaaabacaaccaabbc","aaaaac","cabcaacbcbc","cccbabaabbb","abaaaabb","acbacbcabccab","aaababcabbbb","cbbacbbaaaaaaaccaa","bbabbccbacbca","acbaaac","bbaabaab","aabcaccc","aacaabcc","bacbbccaba","baaaaccabaaacbbbac","cabbcaaabaabbc","caabaacb","ccbabacbabcccbcbbbbc","abcbcbccbaabaaaabcb","cbbacbabacba","abbccabbbaba","bbbabbacbcaac","bbbaac","bccbaabbabcbbbacbab","accaccaaaa","cabcbcbca","abcbbcbbc","ccbcabb","aacbbcaca","cbcccbacb","cbacbaac","acaabcabc","acaccaaccbcbaacbbc","aabaabbbcaaccbbca","babacbccacaaaca","aaaaccacabacaaacacbb","baacbcbccbabbabaccc","baaaab","cbbabcbbcbc","ccaccbcbacaabb","ccbbcabbcacabccaccac","baccbaabaabbcacba","cacbbccbaacabaaa","cccaaaaacabbacbbaa","acacbcabaabcca","bccbbccabbab","bcacbcccccccc","cccbcaabbbcbbacb","cccbc","bccaabcacbaaccbcca","bccbbcbccbbcbb","aacacbcaabacaabbacc","acacaaca","aabccab","bcbbcaacaaabbbccacb","aacccbcacaaabbccbcbb","babccbbcb","cbbaacbca","bbbbbbbacacabcacca","bacabaabb","abccabcabc","cbabaaccaaccabb","bbcbbcacccca","cbacaaaacccaabcbcbc","ccbabbcaba","bcab","aabcaaabcbaaaaca","cbbababccaabbbbaab","acccbaabbcac","caaabaacbaababaaa","bccccbacaacbbacbbc","aabbbabcccb","cbbcabbccacbbbbcc","bcbaabb","bbabacc","abbbabbaccccabcb","babacbccaccbcc","ccaaacaaaac","acbbbbaacaabaaa","cbabaca","ccbacabac","cbacbcbbcbcaac","bccabaacaab","bbcbcbcabbcab","ccacbbabcbcababbbaca","bccabacaab","abbbba","babbbacccbaab","aacc","cbcbacaac","cccccbc","ccaacaaccbaca","cbacccabccbbbbacc","acbcaabbcccabacbc","bbabcbabaaacabb","abbac","ccaababcaacbc","caabcc","acacacbbacaccc","abbabcabac","abbccabccabccb","aaccbcac","cabc","aabbabaccaccbbcab","bacbbabbabcbabcbcacc","caabcacbcabcacccbbcb","cbaaccaaaaab","aacbbcaccbcbacbba","accbbabcaacccbcccb","cacccaaccabac","ccbbbabaabaacac","babaccacbaacbaccb","bcbaababcbccababbb","baacaaaab","aabbccabaaaabbcbc","abaabcc","abbbcabca","bbbbcacccab","caaaccbb","cbcaccccbcbcacabbccb","bcacaa","abaaaabbcbbcaababbbb","abbbacaabbbcb","aacabccbb","cbacabacabcbcacbbab","ccabccbccbcaacabbb","cabbbbab","cccaacacacbbaacbabba","cccacbcac","baabbbccaabbb","ccaacbccbabbabacba","acabbccbacbbcbb","ccacbccbaabacaaccccb","caccabaaaa","acbbcbbcccaabbcbbab","bcbacaaaaa","acaaccacabccbabaaabc","ccacaababaccbba","bcacacbbba","cbabcbcaacaaabb","aabccaaba","baaccb","ccbabbccbabccc","abbbbc","caaccbaacaabbbccabc","babbcbbabcbabccaaacb","cacbbbb","abaaacacbbbbac","acbbabbbabbaaccaa","ababbbb","baca","aabcccbcacaaccbcaacc","ccaacbbbcbabbb","bcacab","ccababbbacaca","abcccccbabcbaccaa","ccacbcaacbcacababbcb","bcccaaccbabbb","babbabbb","ccbccbcccabbbbbaacb","acabaaabaacca","baabccbabbcabcbcbac","ccbbabbbabccccaaaa","bbbccba","bccaab","bacb","ababcbccacbba","aacccabc","aaaacbcbababcc","cacbbbcbcccbbacbabaa","ccabbbabcccccaaacbab","cccaccbabcccaaabaacc","acaaccbac","bccbaabbbbbbabcc","acccaabacac","aaaacacacbbaabbcbca","bccccb","aaaacbbbacc","abcbbbbacaccbcc","acaa","acabaacbbccccca","bbccaabccccaabcaac","bcbcbcbbcbbc","bacbbccccbabcacca","aabccaacaaababcb","abbbcccbaac","bccccbabcbabccb","cabbcaaacbc","bcaccbcbccac","aabbbcbbacbc","cbbcacbcccbc","bbcaabccbccaaac","ccabcccaaaccbbca","abbaaaabcccbbbbbbac","cbababbbbcbabcabcbac","cbabccacbbcca","abbbacaccabccacab","cacabcbccc","bcbbabcabcaacb","cbbac","caccaca","ccacbacbacbcbbabaacb","ccbbacccbbbbaaac","bbcccbabcc","cacb","baacaccbbabbcccaccbc","cababaacacbca","cbaacabaca","aacbabc","baacbbaccccbcbb","bbacbbcaacacabbab","baaabbacabbc","bccacbbcbcccbacabc","bcaaacbbaa","acccbaacaccabcaa","abccbaaabaaabbcb","acbbca","abaacbbab","bbbcbbbcacbcaa","baacbcbacaaa","ccbcbccaabbbcab","aabbacacbcbc","ccbbacbaa","bcaacbcacabb","cbacacabaccccaabb","bbbbacac","caaabaacaba","abbaaaaccaaaabcbcbba","baabcbaacaababcbc","abbcacaaacbbabaa","abba","ccbc","abbaacbacabbabcaaac","ababacaab","ccbcabacacbcb","bacbabcba","bacaaaccbbcbcaaac","aacbcabbccbcaaacaba","accccbc","accaacbccbb","ccbacbababbbbacaa","accbcccababbacc","abcaabbaacb","bbbcbbccaccaabbaccab","accccbabc","abcbccbcbacbcbb","caccabb","cbcbbbbcaac","aacccaaacbc","abcacbcabbbcbccba","bbcaaacccab","caccbaaaccaaabbc","abbcbaacbaccbc","bbcacacbaacbcbb","acbabaabcb","cbbaaabaac","aabbab","abaccbbbb","cccaacccbccb","bcbcabcacaca","aacabbcaccbcccbcba","acabbbabaabbcacca","cbcacbb","abbcaabbabbcc","ccccbbca","babbbcaba","bcbaccbaccbabcaa","cabcbcab","abbcbbbac","bbccbbacbcbbc","aabba","abbab","aabbcaa","bcbcacccbcac","cbbccaabacbbbaababc","bbaaacbcbaababbb","aabaaab","acababc","bbbccccacca","accabcbcacbabbacccaa","bccabbbcbabbbabcc","abaaba","bacaba","ccccabbcbbc","abbcacaabcccbbaa","baacccbaacbcab","baaacacb","bcbcb","bbbcbabccaabcbcba","cbbabbbbccaaba","acbcccccbcbbbccaccb","cacaaabab","baaaacbaacbaacbcbab","ccbaacabb","bbccaaaacbccca","bbbcacbca","cbbccbbaccc","aababacbaabccbbbabcc","abbaaaababacbcba","ccbccaaaabaa","bbbbbbbb","ccba","cacacbbcacccacbabacc","bbcaababc","cbbaaacaccbaabbbbbbc","cabbaaaabbca","cacabcccbacbba","ccaacbcbabbcccb","bbaccccc","caabcabaccb","aacbcaccaacbccaaaac","bcccbbbacbccbbaaab","cabaaacbacccaaccbccb","acbbccbb","bbaacbbcbbabbc","bbaaaa","caacbaacaacbbacccca","ccbbcabcbaabc","cbacb","bbcccbbacc","acaaccba","cabbbaaabcaccbaccbcb","bbacbcbbbaabbaabbaa","abbaacaabbacbcbcccbb","cbbcab","bbbaacabcbababc","aaabcbaaca","aabccccbcababa","bbcbbaaaaabcc","acbaccbacabc","aacba","cbaaaaaabab","cabab","acabbcbabcccccbaca","aacaac","bacaabcbcbcaaa","acbbbcabac","acccaabaaabcabbcaac","acccbcabac","bccbbbc","abccaaacacbaaacb","cbcabaacccbabcaaccac","abbbaccca","ccabccabcaabacccccaa","bcbacbcacbbccaab","caacabaac","aaabaababbb","babcbbcca","caccbbacbbcabaa","caaccc","ccbbcccccccccbcabbc","aababacabcbbac","bcabcabbabbcabba","ccaababccaacbcb","acabbbcc","bbababacacc","abacacbaacccabacbca","aababaabcc","bcccb","ccccc","aaacabbcaababc","bbcbbcbaacaaabcbb","aaabbbabbacabbac","bbaaabaacbc","ccabaccbcb","bbaacababbbcaab","acaaccacb","bccbcaacbcba","cabbcbc","caaaccbac","abbbcacacacc","bbaac","bacacc","bcbcacccbbbcacbabaa","cbcbcacccabaccaabbc","cccaaabcacbcaacaabc","acccbaaaabb","abbbcacaccaabbcbca","baccaababcbccacbcac","ccbcbaa","cacbab","aacbacbc","aacacabab","cabbbaaacbac","cababcb","aabcccabbac","bccbcabaa","bcaabccbacbaabbbabc","abbbaac","caaaabaaaaca","baaab","ccccaababac","accac","bcabcaccababccb","aaccaaacbbcaaaccaac","bbaabcbcccbc","acaaa","babcaabcbca","abcbbaabacabababb","bbbacacacaaccccabba","cbaaccbabbcacab","cacbbbaaabbbac","ccbbacaabaccbcabccb","acaaacabaaa","acccacbabcbbcbcbb","bbbcab","cccbbbcaabbbbcbaba","bcbacb","ccacabaaca","caab","bbabccbabcbcacccbbbc","aaabbbccccc","acaccbbcc","bbaabacacbbbcabac","bccbaacccabaaacabbbc","cbcbcbbbcccbaaaabb","bcccaacacbaaccbcca","aabcac","baacaaaacbbccaaac","cabaabbbbbbbbba","bacca","acaac","cccabbabcac","bcbccbcabbbbacccab","baacc","bbccbcbbccccbbbacac","cabcbababccbca","aaaaababacbbaccaaaac","bcbcbaaaaccbbc","aacababbcbcbaacca","bccbbaaabababcaccbb","cbacbcaca","acabbbabc","caacbacbbb","ccacaacbbbcabcbaa","accaabbab","aaaaccaaba","acbbcbbbcbacbcabbbb","cbcabbcb","abbcacabaacbbbbbbbb","bacabaaabccbcbcb","bbcaabccbcabc","aaaaabcccaaaaa","aabbcbababcaba","bccaaccbaabc","acaabcabaabbccbab","acbbbacca","cbabba","bccaa","ccccacbbabcccccaca","cbbccabaacccaacbbba","aabacbccaccbacab","bbcccbb","bbcabaaaaccbabab","bccaccbcaaaabccac","caaccabaaacccc","ccaabcaacba","bbbccaaca","bcabcbbaccaccacbcbbc","bcacbbbcacbbac","abccccbacabccb","abbcaabcccaabac","bcbaccbbaabbccaca","bccca","aacbabbbbbac","bbcaacccc","ababcbcbcbcaaaabc","bcbccaaaaaa","aacabbccbabbbacbacc","bcacabbccbcababaabc","cbbbaacbcbb","caaaccbbbabaaaabc","acbcbcaccbbbababb","cccbbbccabccaaa","abbcbcbbbbccacab","ccbacbaabcb","cbaac","abacaabb","babcccbbbc","ccabcbaaaaa","abbcbbcaaa","bbcbacccccbccabbc","bbbaaabaaccbcbcacbc","cbbcabbcaaaccabaac","acccbcabbababc","abccbbacccbabcabacaa","abbcbb","cbccabcabbabcb","cacbbbacbbbbaabaa","ccaaac","abcab","babcbccbabcbacaac","cccabcc","cbcabcccbbcca","cbabaaa","ccaaacbcbbac","cbbccbaccabbacb","aaccccbaabab","abaaaabcbbbcabcaac","bacbbcccabacab","cacabccbacbcbbcbbc","acbcaccabc","bbaabac","bacbaabcaabcbaa","aacbccbccccbbabbabb","abaaccaaacbbbabccb","baaaabbbabccbbbbbbaa","cbcbc","cbbcaaca","cbaccbcaaccb","aaacabcaacacacaa","acbcbbacbccabcaba","bbcaacacac","accaabaabaccabaabba","cccbbbcccc","bcbca","acacccbbcbcc","abbbcccacbacb","aacacbaababbcaab","aaabbacacbcbbcbbcc","babccaccaabbc","ababaacababccbabcc","bcccaaaaccca","ccbbbcc","bbacbbaaacbcbabcaabc","bcaabbcaaabcabcbcca","cbaaacc","caacbbcaacbbbabbca","cbcbccbca","abbabacaccab","bbbcaccacbcabba","bacbbaaabacaccbcac","aacaaccabcbb","cbccbcbaacbbc","abbabcaaba","cabacbabcabbcaca","ccaabcbcc","bccbbcbbbbbbacbacc","ababbcab","baabaaaccaaacabcbca","cbaacbbacccaacacb","bbcabcaaab","acabaacbbbabbacb","acbbbccabc","accbbb","ccbcbcacbcaaac","aacbaaacabaccbcaaba","cacacabcbacaacaccc","bbaaabcbaaacca","bbaacbaca","cbabcbcc","bbcabaccaaacccba","aaabac","abcaacaaaababaacbbc","baccabccaba","ccaabcbbaac","aaaacbcc","aabac","babcaa","cccabbacc","acbbaaccbccaaacbbcc","aaccbcb","ababaccaabaaababbc","ccabbabbaababa","cabcbbacc","aabbccaabbcbaccbc","babbbbcbbbabba","acacbccaabaaccbabc","bccbabcaaaa","cbbcbaabcabbabb","bccbaabbccbbaaaac","acbbbaabcaaaacc","cbabbcbcacbaabbccb","aaaacc","aacaaca","ccbbbcbaaaccbcbccb","babaaaabbbcacbaca","bccbca","accc","accaabcaacb","cbbaabccbabaa","caabccccbcaa","bcbbacccb","cabccaca","bcbcbcaccba","caabcccacbcca","bababa","cbabacbb","caababaccbbbbccaab","bcccccabaacaabaaacb","ababacacbb","bcaaaaccbababaaabcc","abbcccaacacbbbc","accacbb","accbabcabccacbaa","abcababbb","bcbaababbbbbbbbbacab","cababbacccabcc","abcaaca","bbaabaaa","cbbababcac","aaabbcabc","abacbbcaccbbabccab","caaaab","abbcbbaba","bbcba","cbbbacabcac","cbaabaccb","bbbbcacbbbacc","caabbabcaccbcccccab","caabbcbcbaacbacccc","baaccbbbbbcabbca","ababbaaaaa","bbbbccc","babaccb","acabbabccccaacaabab","bccbababaccb","bababcaa","bcccbcacbab","cabcccccbaaaabb","ccbacaaabaabbbba","aaccccbcabbbccca","cabcbcbccbbbc","acbbacaba","baaaaa","aacbbaacaacc","ccbabccac","caacbaaccbccbabaacb","baccacaaababcaab","cabbbccbcbac","bbabcabaaa","bbcbac","bcbaab","ccabcaaaaacac","bbabbcbabab","ccbabbcb","ccabcabbc","cbaacabaac","acbcbabcbaaccb","cbbbabcc","bbcabac","baccbcbacc","aaccabbaccb","aacacbacbacbcbabcb","cacabbabbbbbaaccaab","bbaabaacbbbbbcc","bccaaabaacaababacb","cbcabcabcacbaacbcca","cbcabbbabcbacaabcaba","aabbbaabc","abcbccbb","caccbb","cacbabaccacbacacab","bbbbcbc","bcbbbacacbbbaccabbcb","ccacacbcccb","baaababccaccb","babcababcbbcbbbcc","abbacbaccabbbbcbc","bcccbbacc","cacabaabcabbc","caccabbaccbabb","bbacbabaa","bbcbbaccccaa","cacccabcccbacbacca","bcccacabaccb","bbccabb","bccbaccbabbccbcacc","bacab","ccbaccacbabaaccccbba","ccbaaabb","baabcbacbcbbbcaaca","aacbbaaccaaacbbcacba","ababba","acbbbabac","babcabaccbcaaaa","acbcbabaabcbbbbc","acacabacaccbcaab","cccbbabbbcab","aaacaabccbcab","cbacbbbacb","acbabb","cbccbbb","bccbcbbabbcab","cccbbbb","cacbbababcabbbcbccc","aaccacab","acabc","bccaabaaabaacccbbac","baaacacbcabcbbb","aaabcbba","bbcccac","baababbbccccbbbccca","babccacababccbccaa","caabbbababaacabcbaaa","bccabbcbbbbacaa","baacbccccbcaaabccca","aaccccbbbabcbabbbaaa","bcbaccacabccab","aacccccbcccbbbaabbbc","bbcabcccb","cbcbabacbab","acabcc","acaaabcabaccbbc","bbbbbcca","cbcabcbaacaacaab","babccbaabbbaaaabaac","cabcccaca","ccacaacacaccab","abacbcaac","cabbabaaaa","cbaccbaaccbabcccbbbb","cbcbbab","abbbabbcacabcbac","bacccabcbca","aaaccaacbbbb","abcccbccbabaacaab","caacbcabcabb","abbcaababbccbbaaaa","aaabbbcb","cabacbabbbccabba","ccbcacaabbbcc","cccaabccabccaaacbbcc","accbbcaacccbbcaa","bcaababacaaabc","acccbaaccaaabcccca","bcaabbccbccaa","cbbaaacaacbaa","abbbbcbacbccb","bababbabbacbcabc","bccccab","bbbbcbccbbabcacabba","acaaabaabb","aacbccc","bccbaccccabcaaabab","cbccabacbc","aaccbaab","aaccbcaaabbcab","cbbcbbcaaccab","baacbaaabacc","bcaccacbaccabbbba","ababbbbbc","caabbbb","caacaacaa","bcaaa","caaccbaa","aabccacabbbbbabaabab","aaba","abbccbcab","bccaabccacbbabbbcaa","bcbcabccccabcabbbbbb","abcacbaccb","cbacacacbaaa","bbabcbaabacaaac","bacbbaaaaa","cbcccacaacaacbbbccc","cbbcbbbcbabc","ccabbaac","aaaccb","bcbaca","abbabbaaacbbbcc","cbababbcccb","accccbbacc","bccbccbbccbbabbca","baccbbccabaabbaaaac","cbbaaaccacbbcccacb","aaccbccabcccbaabaac","ccbbcbc","bcbccaabcbcca"}
	palindromePairs(list)
	fmt.Print("时间：",time2.Since(time))

	//for _,v:=range lists{
	//	fmt.Println(v)
	//}

}


func palindromePairs(words []string) [][]int {
	var str1 string
	var str2 string
	var list2 [][]int
	for i:=0;i< len(words);i++{
		for j:=i+1;j<len(words);j++{
			str1 = words[i]+words[j]
			str2 = words[j]+words[i]
			bool1:=returnTrueOrFalse(str1)
			bool2:=returnTrueOrFalse(str2)
			if bool1 {
				var a []int
				a = append(a,i,j)
				list2= append(list2,a)
			}
			if bool2 {
				var b []int
				b = append(b,j,i)
				list2= append(list2,b)
			}
		}
	}
	return list2

}

func returnTrueOrFalse(str string)bool{
	for i := 0; i < len(str)/2; i++ {
		if str[i] !=str[len(str)-i-1]{
			return false
		}

	}
	return true
}